package com.example.demo;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 服务的调用
 * name:远程服务名，及spring.application.name配置的名称
 此类中的方法和远程服务中contoller中的方法名和参数需保持一致。
 */
@FeignClient(name= "hello-service",fallback=HelloRemoteHystrix.class)
public interface ProducerRemote {
    @RequestMapping(value = "/helloWord")
    public String helloWord(@RequestParam(value = "name") String name);
}
